package router

import (
	"github.com/gin-gonic/gin"
	jwt "github.com/go-admin-team/go-admin-core/sdk/pkg/jwtauth"
	"tuowei.com/app/admin/apis"
	"tuowei.com/common/actions"
	"tuowei.com/common/middleware"
)

func init() {
	routerCheckRole = append(routerCheckRole, registerSysVersionRouter)
}

func registerSysVersionRouter(v1 *gin.RouterGroup, authMiddleware *jwt.GinJWTMiddleware) {
	api := apis.SysVersion{}
	r := v1.Group("/sys-version").Use(authMiddleware.MiddlewareFunc()).Use(middleware.AuthCheckRole()).Use(actions.PermissionAction())
	{
		r.POST("", api.Insert)
		r.PUT("", api.Update)
		r.DELETE(":id", api.Delete)
		r.GET("", api.List)
		//r.POST("/userList", api.GetUserList)
		//r.GET("/:id", api.Get)
		//r.POST("", api.Insert)
		//r.PUT("", api.Update)
		//r.DELETE("", api.Delete)
	}
}
